package com.wh.hotel.util;

/**
 * @author luweije
 */
public class PriceUtil {

    public static Integer yuan2Cent(Integer yuan) {
        return yuan * 100;
    }

    public static int halfEven(int orgPrice) {
        int cent = orgPrice % 100;
        if (cent == 0) {
            return orgPrice;
        }
        if (cent < 50) {
            cent = 50;
        } else {
            cent = 100;
        }
        return orgPrice / 100 * 100 + cent;
    }

}
